﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace WorkOrder.Models;

/// <summary>
/// 工单类型表
/// </summary>
[Table("工单类型表")]
[Index("类型代码", Name = "类型代码", IsUnique = true)]
public partial class 工单类型表
{
    /// <summary>
    /// 类型ID
    /// </summary>
    [Key]
    [Column("类型ID")]
    public ushort 类型id { get; set; }

    /// <summary>
    /// 类型代码
    /// </summary>
    [StringLength(50)]
    public string 类型代码 { get; set; } = null!;

    /// <summary>
    /// 类型名称
    /// </summary>
    [StringLength(100)]
    public string 类型名称 { get; set; } = null!;

    /// <summary>
    /// 响应SLA(分钟)
    /// </summary>
    [Column("响应SLA")]
    public ushort? 响应sla { get; set; }

    /// <summary>
    /// 解决SLA(小时)
    /// </summary>
    [Column("解决SLA")]
    public ushort? 解决sla { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column(TypeName = "datetime")]
    public DateTime 创建时间 { get; set; }

    [InverseProperty("类型")]
    public virtual ICollection<工单主表> 工单主表s { get; set; } = new List<工单主表>();
}
